Hey Nathan, it wasn't my intention to discredit your work -- rather, to build on it. I was trying to say "I don't quite understand why the original code works", when obviously it does, and posted a rewrite that *also* works and that I understood better myself [along with the big ol' comment]. If I was some kind of super-sysadmin, perhaps I *would* understand why the original code works, which is why I asked... I know my code comments tend to get a little caustic sometimes [skey is a good example], no insult intended! Btw, trying to trace /bin/mail largely fails on sunos [at least] because at one point it shuts off all its own signals, and that's the last you get in the trace file. But it does give you enough to see the mktemp() name!! Thus, in theory I didn't have to look at the source, tee hee... _H*